;
$(function () {
    var $_sideL = $(".mod_main .side-l");
    var $_sideR = $(".mod_main .side-r");
    var leftH = $_sideL.outerHeight();
    var rightH = $_sideR.outerHeight();
    if (leftH > rightH) {
        $_sideR.css("height", leftH);
    } else {
        $_sideL.css("height", rightH);
    }
    /*nav bar*/
    $(".top_mainnav").on("mouseenter", "li > a", function () {
        var $_self = $(this);
        var obj = $(this).offset();
        $_self.addClass("current");
        var $_menu = $(this).closest("li").find(".drop-menu").css({
            "width": $_self.outerWidth() - 2,
            "left": obj.left - $_self.outerWidth() - 14,
            "top": obj.top + $_self.outerHeight(),
            "display": "block"
        });
        var timer = null;
        $_self.on("mouseleave", function () {
            var $_nav = $(this);
            timer = window.setTimeout(function () {
                $_nav.removeClass("current");
                $_menu.hide();
            }, 100);
        });
        $_menu.on("mouseenter",function(e){
            if(timer){
                window.clearTimeout(timer);
            }
        });
        $_menu.on("mouseleave", function (e) {
            $(this).hide();
            $_self.removeClass("current");
        });
    });
    //设置更多菜单选项-----------
    $("#J_fixed_profile").on("click",function(e){
        var $_topArrow=$(this).find(".arrow"),$_menu_in=$("#J_menu_in");
        if($("#J_menu_in").is(":visible")){
            $_menu_in.slideUp();
            $_topArrow.addClass("darrow");
        }else{
            $_menu_in.slideDown();
            $_topArrow.removeClass("darrow");
        }
        return false;
    });
});
